<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class advice extends CI_Controller {
	
	function __construct()
	{
		parent::__construct();		
		$this->load->model('advice_model','advice');
		$this->load->model('home_model','home');
		$this->load->model('news_model','news');
	}
	
	function index()
	{
		$data['title'] = "Tư Vấn" ;
		$data['listcat'] = $this->home->get_item_cat();//trit($data['listcat']);
		$data['list_bnright'] = $this->home->get_bnright();//trit($data['list_bnright']);
		$data['listnew'] = $this->news->getNews(3);//trit($data['listnew']);
		$data['list'] = $this->advice->get_advice(3);//trit($data['list']);
		$this->load->view('advice',$data) ;
	}
	
	function detail($id)
	{
		$data['rs'] = $this->advice->getID($id);//trit($data['rs']);
		$data['relative'] = $this->advice->get_advice(5);
		$data['list_bnright'] = $this->home->get_bnright();//trit($data['list_bnright']);
		$data['listnew'] = $this->news->getNews(3);//trit($data['listnew']);
		$data['listcat'] = $this->home->get_item_cat();//trit($data['listcat']);
		$this->load->view('advice_detail',$data);
	}
}
	

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */